/*
 * ButtonModel.java  0.4.0 / Oct 26, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
package com.cute4j.swing;

import com.cute4j.swing.events.ChangeListener;

/**
 * Button Model.
 *
 * @author Slobodan Vrkacevic
 * @version 0.4.0
 */
public interface ButtonModel {

  /**
   * Returns <tt>true</tt> if the button is enabled.
   *
   * @return <tt>true</tt> if the button is enabled
   */
  public boolean isEnabled();

  /**
   * Returns <tt>true</tt> if the button is pressed.
   *
   * @return <tt>true</tt> if the button is pressed
   */
  public boolean isPressed();

  /**
   * Returns <tt>true</tt> if the button is selected.
   *
   * @return <tt>true</tt> if the button is selected
   */
  public boolean isSelected();

  /**
   * Enables/ disables the button.
   *
   * @param enabled <tt>true</tt> if enabled
   */
  public void setEnabled(boolean enabled);

  /**
   * Pressed/unpressed the button.
   *
   * @param pressed <tt>true</tt> if pressed
   */
  public void setPressed(boolean pressed);

  /**
   * Selects/deselects the button.
   *
   * @param selected <tt>true</tt> if selected
   */
  public void setSelected(boolean selected);

  /**
   * Adds change listener.
   *
   * @param listener the change listener
   */
  public void addChangeListener(ChangeListener listener);

  /**
   * Removes change listener.
   *
   * @param listener the component listener
   */
  public void removeChangeListener(ChangeListener listener);

}
